tools/examples/block better use of losetup -r
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Dec 2007 15:05:15 +0000 (15:05 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Dec 2007 15:05:15 +0000 (15:05 +0000)
commitdb9b8625ccaa654a9f0395ef500ee83f7b662320
treedb011f722327f5a013ab2df3d28e897a1f02944b
parentbe169a04bc6b64b1acd881a54203d2788573364c
tools/examples/block better use of losetup -r

Use losetup -r when the vbd is specified to be readonly, but only if
-r is supported (rather than always creating a writeable losetup
mapping if possible).

This was inspired by (but not derived from) a diff from the Fedora 8
patchset which uses -r iff the vbd is specified as readonly.  We need
to be cleverer upstream because not all systems have losetup -r.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/examples/block